package com.summer.service.impl;

import com.summer.entity.UserMoneyRate;
import com.summer.mapper.UserMoneyRateMapper;
import com.summer.service.IUserMoneyRateService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 用户借款金额Service实现类
 */
@Service
@Transactional
public class UserMoneyRateServiceImpl implements IUserMoneyRateService {

    @Resource
    private UserMoneyRateMapper userMoneyRateMapper;

    @Transactional
    @Override
    public int insert(UserMoneyRate userMoneyRate) {
        return userMoneyRateMapper.insert(userMoneyRate);
    }

    @Override
    public int update(UserMoneyRate userMoneyRate) {
        return userMoneyRateMapper.update(userMoneyRate);
    }

    @Override
    public UserMoneyRate findByUserId(Integer uid) {
        return userMoneyRateMapper.findByUserId(uid);
    }

    @Override
    public int deleteById(Integer id) {
        return userMoneyRateMapper.deleteById(id);
    }
}
